package com.row.test;

import org.easymock.EasyMock;
import org.easymock.IMocksControl;
import org.junit.Test;

import com.model.User;
import com.rfid.RFIDCallException;
import com.rfid.RFIDCaller;
import com.rfid.row.RFIDRoW;
import com.rfid.row.RFIDRoWImpl;

public class testAll {

	@Test
	public void TestAll() {
		try {
			User user = new User();
			user.setId(12);
			user.setAge(21);
			user.setName("son");
			RFIDRoW rfidRoW = new RFIDRoWImpl();
			//user = rfidRoW.readAsObject(User.class);
			//System.out.println("user : " + user.getAge());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		IMocksControl control = EasyMock.createControl();
		RFIDCaller call = control.createMock(RFIDCaller.class);
		try {
			EasyMock.expect(call.read(1, 2)).andReturn("season");
		} catch (RFIDCallException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		try {
			call.ring();
		} catch (RFIDCallException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		EasyMock.expectLastCall().anyTimes();
	}

}
